
public class diversity {
	int scheme;
	static byte [] A;
	static byte [] B;
	static byte [] C;
	static byte [] A_Xor_B;
	static byte [] A_Xor_C;
	static byte [] B_Xor_C;
	static byte [] A_Xor_B_temp;
	static byte [] A_Xor_C_temp;
	static byte [] B_Xor_C_temp;
	 
	public diversity (int x){
		scheme = x;
	}
public static void Two_Three(byte [] one, byte [] two)
{
	A_Xor_B_temp = new byte [one.length];
	for(int i=0;i<one.length;i++){
		A_Xor_B_temp [i]=(byte)(one[i]^two[i]);
	}
	 A =  new byte[one.length+1];
	 A[0]=0;
	 System.arraycopy(one,0,A,1,one.length);
	 B =  new byte[two.length+1];
	 B[0]=1;
	 System.arraycopy(two,0,B,1,two.length);
	 A_Xor_B = new byte[A_Xor_B.length+1];
	 A_Xor_B[0]= 3;
	 System.arraycopy(A_Xor_B_temp,0,A_Xor_B,1,A_Xor_B_temp.length);
}
public static void Four_Six(byte [] one, byte [] two, byte [] three){
	A_Xor_B_temp = new byte [one.length];
	A_Xor_C_temp = new byte [two.length];
	B_Xor_C_temp = new byte [three.length];
	for(int i=0;i<one.length;i++){
		A_Xor_B_temp [i]=(byte)(one[i]^two[i]);
	}
	for(int i=0;i<two.length;i++){
		A_Xor_C_temp [i]=(byte)(one[i]^three[i]);
	}
	for(int i=0;i<two.length;i++){
		B_Xor_C_temp [i]=(byte)(two[i]^three[i]);
	}
	 A =  new byte[one.length+1];
	 A[0]=0;
	 System.arraycopy(one,0,A,1,one.length);
	 B =  new byte[two.length+1];
	 B[0]=1;
	 System.arraycopy(two,0,B,1,two.length);
	 C =  new byte[three.length+1];
	 C[0]=2;
	 System.arraycopy(three,0,C,1,three.length);
	 A_Xor_B = new byte[A_Xor_B.length+1];
	 A_Xor_B[0]= 3;
	 System.arraycopy(A_Xor_B_temp,0,A_Xor_B,1,A_Xor_B_temp.length);
	 A_Xor_C = new byte[A_Xor_C.length+1];
	 A_Xor_C[0]= 4;
	 System.arraycopy(A_Xor_C_temp,0,A_Xor_C,1,A_Xor_C_temp.length);
	 B_Xor_C = new byte[B_Xor_C.length+1];
	 B_Xor_C[0]= 5;
	 System.arraycopy(B_Xor_C_temp,0,B_Xor_C,1,B_Xor_C_temp.length);
	
}

}

